/*
 * Title:        CloudScheduler Toolkit
 * Description:  a Toolkit for Modeling and Simulation of Job Scheduling and Resource Provisioning in Cloud System
 * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html
 * Author:       Fuhui Wu
 *
 * Copyright (c) 2013-2014, The National University of Defense Technology, China
 */

package org.nudt.jCloud.simulation;

import org.nudt.jCloud.workload.Workload;

public class User {
	private String userName;
	private UserBroker userBroker;
	private Workload wl;
	private int submittedXJobCount;

	public User(String userName, Workload wl){
		setUserName(userName);
		setWl(wl);
		wl.setUser(this);
		setSubmittedXJobCount(0);
	}
	
	public void reset(){
		userBroker = null;
		wl.reset();
		setSubmittedXJobCount(0);
	}
	
	public UserBroker getUserBroker() {
		return userBroker;
	}

	public void setUserBroker(UserBroker userBroker) {
		this.userBroker = userBroker;
	}

	public Workload getWl() {
		return wl;
	}

	public void setWl(Workload wl) {
		this.wl = wl;
	}

	public int getSubmittedXJobCount() {
		return submittedXJobCount;
	}

	public void setSubmittedXJobCount(int submittedXJobCount) {
		this.submittedXJobCount = submittedXJobCount;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

}
